<template>
    <div>
        <button>切换</button>
        <AIndex v-move:moveTitle.asyncTitle="{background:'red'}"></AIndex>
    </div>
</template>

<script setup lang="ts">
import AIndex from './test3/index.vue'
import { Directive, ref, DirectiveBinding } from 'vue';
let flag = ref<boolean>(true)

type Dir = {
    background : string
}

const vMove:Directive =  {
    created() {
        console.log('created')
    },
    beforeMount(){
        console.log('beforeMount')
    },
    mounted(el:HTMLElement , dir : DirectiveBinding<Dir> ){
        console.log('mounted')
        console.log(dir.value.background);
    },
    beforeUpdate(){
        console.log('beforeUpdate')
    },
    updated(){
        console.log('beforeUpdate')
    },
    beforeUnmount(){
        console.log('beforeUnmount')
    },
    unmounted(){
        console.log('unmounted')
    }

}

</script>

<style scoped>
</style>


